/**
 * @decription:添加案例
 *  @param：#submit 提交
 */

$("#saveBtn").click(function() {
    addRoom();
});

function addRoom(){
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "rest/room/add",
        data: {
            roomName: $("#name").val(),
            roomNumber: $("#number").val(),
            roomTeacher: $("#teacher").val(),
        },
        success: function(data) {
            window.location.href="rest/room/room";  //跳转到列表页面
        }

    });
}

